package binary;

import java.util.Scanner;

public class BinaryDemo {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入十进制数字");
        int n=scanner.nextInt();
        System.out.println("得到二进制结果为"+Integer.toBinaryString(n));
        System.out.println("得到16进制结果为"+Integer.toHexString(n));

    }
}
